<template>
    <div class="notifac_index">
        <div class="button" v-if="!shortcutstore.state.show">
            <img src="@/assets/kjj.png" style="height: 34px;" alt="" @click="shortcutstore.openShortcut()">
        </div>
        <el-drawer v-model="shortcutstore.state.show" class="shortcut_drawer" title="快捷键设置" size="40%" direction="rtl" @close="closedrawer()">
            <Drawer />
        </el-drawer>

    </div>
</template>

<script setup>
import Drawer from "./components/Drawer.vue";
import { shortcutSellStore } from "./shortcut.js";
const shortcutstore = shortcutSellStore()
provide('shortcutSell', {
    shortcutstore,
    shortcutstate: shortcutstore.state
})

const closedrawer = () => {
    window.electron.installshortcut(JSON.stringify(shortcutstore.state.shortcutList))
}

</script>

<style lang="scss" scoped>
.notifac_index {
    position: fixed;
    right: 0;
    top: 0;
    z-index: 4000;

}

.button {
    position: absolute;
    right: 0;
    top: 40px;
    padding: 0px 4px;
    // background-color: #ff7900;
    cursor: pointer;
    // border: 1px solid #ff7900;
}
</style>

<style>
.shortcut_drawer{
    z-index: 4000;
}
.shortcut_drawer .el-drawer__header{
    margin-bottom: 6px;
}
</style>